<%-- 
    Document   : fileUpload
    Created on : 2009-2-12, 16:05:13
    Author     : cyp
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ page import="sunsite.tools.*,java.util.*,sunsite.service.*" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>文件上传</title>
    </head>
    <body>
        <script>
            function Submit(object)
            {   var type = document.getElementById('type');
                type.value=object;
                if(object=='addBtn'){
                    type.value='rtypeitem';
                }
                document.forms[0].submit();
            }
            function setContinue()
            {   var resName = document.getElementById('resName');
                resName.value='';
                var discription = document.getElementById('discription');
                discription.value='';
            }
        </script>
        <form action="fileUpload.action" method="POST" enctype="multipart/form-data">
            <input type="hidden" name="type" value="submit"/>            
            <table>
                <tr>
                    <td>资源名称</td>
                    <td><s:textfield name="resName" theme="simple"></s:textfield></td>
                </tr><tr>
                    <td>类型</td>
                    <td><s:select name="rtp" list="Resource_tpList"  headerKey="0" headerValue="请选择" listKey="tpId" listValue="tpName"  theme="simple" onchange="Submit(this.id)"></s:select>
                        <s:select name="rcatelog" list="Resource_catelogList" headerKey="0" headerValue="请选择" listKey="catId" listValue="catName" theme="simple" onchange="Submit(this.id)"></s:select>
                        <s:select name="rtype" list="Resource_typeList" headerKey="0" headerValue="请选择" listKey="typeId" listValue="typeName" theme="simple"></s:select>
                    </td>
                </tr><tr>
                    <td>描述</td>
                    <td><s:textarea name="discription" theme="simple"></s:textarea></td>
                </tr><tr>
                    <td>文件</td>
                    <td><s:file name="uploadfile" label="File"/></td>
                </tr>
              <tr><td colspan="2" align="center"><input type="submit" id="submitBtn" value="提交"/><input type="button" id="continueBtn" value="继续" onclick="setContinue();"/></td></tr>
            </table>            
        </form>
    </body>
</html>
